import java.util.Scanner;

public class Area_2 {
    public static void main(String arg[]) {
        TrangleArea(2,2);
        SquareArea(5);
        RectangleArea(3,4);
    }
    public static void TrangleArea(double a,double b) {
        System.out.println("请输入三角形的高："+a);
        System.out.println("请输入三角形的底："+b);
        System.out.println("三角形的面积是" + (a * b) / 2);
    }
    public static void SquareArea(double a){
        System.out.println("请输入正方形的边长："+a);
        System.out.println("正方形的面积是" + a*a);
    }
    public static void RectangleArea(double a,double b){
        System.out.println("请输入长方形的长："+a);
        System.out.println("请输入长方形的宽："+b);
        System.out.println("长方形的面积是" + a*b);
    }


}

